home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1989 September
/
1989-09.d64
/
ez bar charter
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
2KB
|
84 lines
10 rem copyright 1989 compute! publications, inc. - all rights reserved
15 poke53281,6:poke53280,6:poke646,1
20 print"[147]"tab(11)" graph maker [146]"
30 printtab(12)"copyright 1989":printtab(7)"compute! publications, inc."
40 printtab(10)"all rights reserved"
50 forx=0to2000:next
60 print"[147]"tab(9)" y-axis [146] graph range"
70 printtab(14)" 1 [146] 0-40":printtab(14)" 2 [146] 0-100"
80 printtab(14)" 3 [146] 0-200"
90 print""tab(12)"select (1-3) "
100 geti$:ifi$<"1"or i$>"3"then100
110 i=val(i$):if i=1 thenmax=40
120 if i=2 thenmax=100
130 if i=3 thenmax=200
140 print" how many items will be graphed? (1-8)"
150 getl$:if l$<"1"orl$>"8"then150
160 l=val(l$):print"[147] enter a 3 character label and a value"
170 print" for each item to be graphed. the value"
180 print" entered must fall between 0 -";max;""
190 forx=1 to l
200 print" label";x;:inputm$(x)
210 iflen(m$(x))<>3thenprint"[145][145][145]":goto200
220 printtab(17)"[145]value for ";m$(x);:inputh(x)
230 ifh(x)<0orh(x)>maxthen220
240 next
250 print"[147] enter a title (25 characters or less) for your graph."
260 input" title: ";gt$
270 iflen(gt$)>25orlen(gt$)<1then250
280 print"[147] graphing range [146] 0 -";max
290 print" graph labels [146] value [146]"
300 forx=1tol
310 printtab(5)m$(x);tab(21)h(x):nextx
320 print" graph title [146] ";gt$
330 print" everything correct? y/n[146]"
340 getk$:ifk$=""then340
350 ifk$="n"then60
360 print"[147] ";gt$:forx=0to19:print" [171]":nextx
370 print" [183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183]"
380 printtab(6);
390 forx=1tol
400 printh(x);
410 next:print
420 print" ";:fortt=1tol:printm$(tt);" ";:next:print""
430 print" ";:ifmax>40thenprint"[157]";
440 printmax
450 ifi=1then480
460 ifi=2then500
470 ifi=3then520
480 forx=36to10step-4:print" " x:next
490 forx=8to0step-4:print" ";x:nextx:goto540
500 forx=90to10step-10:print" " x:nextx:print" 0"
510 goto540
520 forx=180to100step-20:print" [157]"x:nextx
530 forx=80to0step-20:print" "x:nextx:print"[145] 0":goto540
540 d=2:x=0:r=37:forx=1tol:print"":r=r+4:forsp=1to3:printspc(255):nextsp
550 printspc(r)
560 d=d+4:print"[145] [166][166][161]"
570 ifi<3andh(x)=0then700
580 ifi=3andh(x)<10then700
590 ifi=1andh(x)<4then680
600 ifi=2andh(x)<=5 then680
610 ifi=3andh(x)<=20then680
620 ifi=1theny=int(h(x)/2)-1:goto670
630 ifi=3theny=int(h(x)/10)-1:goto670
640 ifi=2thenaa=h(x)/10:bb=int(h(x)/10):cc=aa-bb:ifcc=0theny=bb*2-1:goto670
650 ifcc<=.5theny=bb*2
660 y=bb*2+1
670 forb=1toy-1:printtab(d)"[145][145] [166][166][161] ":nextb
680 printtab(d)"[145][145] [162][187]":nextx
690 ifx=l+1then710
700 nextx
710 d=2
720 d=d+4:ifh(x)=0then740
730 printtab(d):printh(x):next
740 getk$:ifk$=""then740
750 ifk$="a"thenrun
760 ifk$="p"then790
770 print" 'p' to print 'a' for another "
780 goto740
790 print" "
800 open6,4,6:print#6,chr$(15):close6
810 open3,3,3:open4,4:print"";:forc=0to1022:get#3,a$:print#4,a$;:next
820 print"[147]":print#4:close4:close3:goto360